package me.zk.practice1.hw;

import java.util.Scanner;

public class HWBJ27 {
    //3
    //14
    //10 4 5
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int s = Integer.parseInt(scanner.nextLine());

        int total = Integer.parseInt(scanner.nextLine());

        int[] nums = new int[s];
        for (int i = 0; i < s; i++) {
            nums[i] = scanner.nextInt();
        }

        int add = 0;

        while (true) {
            boolean ok = true;
            int sum = total;
            for (int i = 0; i < s; i++) {
                sum = sum-nums[i]+add;
                if (sum<0){
                    ok = false;
                    break;
                }
            }
            if (ok) {
                System.out.println(add);
                break;
            }
            add++;

        }

    }
}
